home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.misc
- From: daveg@synaptics.com (David Gillespie)
- Subject: v24i104: gnucalc - GNU Emacs Calculator, v2.00, Part56/56
- Message-ID: <1991Nov3.001159.20135@sparky.imd.sterling.com>
- X-Md4-Signature: 3af889bdab21f8e088757c025612af06
- Date: Sun, 3 Nov 1991 00:11:59 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: daveg@synaptics.com (David Gillespie)
- Posting-number: Volume 24, Issue 104
- Archive-name: gnucalc/part56
- Environment: Emacs
- Supersedes: gmcalc: Volume 13, Issue 27-45
-
- #!/bin/sh
- # do not concatenate these parts, unpack them in order with /bin/sh
- # file calc.texinfo continued
- #
- if test ! -r _shar_seq_.tmp; then
- echo 'Please unpack part 1 first!'
- exit 1
- fi
- (read Scheck
- if test "$Scheck" != 56; then
- echo Please unpack part "$Scheck" next!
- exit 1
- else
- exit 0
- fi
- ) < _shar_seq_.tmp || exit 1
- if test ! -f _shar_wnt_.tmp; then
- echo 'x - still skipping calc.texinfo'
- else
- echo 'x - continuing file calc.texinfo'
- sed 's/^X//' << 'SHAR_EOF' >> 'calc.texinfo' &&
- @r{ @: v i @:n @: 31 @:idn@:(1,n)}
- @r{ @: v i @:0 @: 31 @:idn@:(1)}
- @r{ h t@: v k @: @: 2 @:cons@:(h,t)}
- @r{ h t@: H v k @: @: 2 @:rcons@:(h,t)}
- @r{ v@: v l @: @: 1 @:vlen@:(v)}
- @r{ v@: H v l @: @: 1 @:mdims@:(v)}
- @r{ v m@: v m @: @: 2 @:vmask@:(v,m)}
- @r{ v@: v n @: @: 1 @:rnorm@:(v)}
- @r{ a b c@: v p @: @: 24 @:calc-pack@:}
- @r{ v@: v r @:n >0 @: 21,31 @:mrow@:(v,n)}
- @r{ v@: v r @:n <0 @: 31 @:mrrow@:(v,-n)}
- @r{ m@: v r @:0 @: 31 @:getdiag@:(m)}
- @r{ v i j@: v s @: @: @:subvec@:(v,i,j)}
- @r{ v i j@: I v s @: @: @:rsubvec@:(v,i,j)}
- @r{ m@: v t @: @: 1 @:trn@:(m)}
- @r{ v@: v u @: @: 24 @:calc-unpack@:}
- @r{ v@: v v @: @: 1 @:rev@:(v)}
- @r{ @: v x @:n @: 31 @:index@:(n)}
- @r{ n s i@: C-u v x @: @: @:index@:(n,s,i)}
- X
- @c
- @r{ v@: V A @:op @: 22 @:apply@:(op,v)}
- @r{ v1 v2@: V C @: @: 2 @:cross@:(v1,v2)}
- @r{ m@: V D @: @: 1 @:det@:(m)}
- @r{ s@: V E @: @: 1 @:venum@:(s)}
- @r{ s@: V F @: @: 1 @:vfloor@:(s)}
- @r{ v@: V G @: @: @:grade@:(v)}
- @r{ v@: I V G @: @: @:rgrade@:(v)}
- @r{ v@: V H @:n @: 31 @:histogram@:(v,n)}
- @r{ v w@: H V H @:n @: 31 @:histogram@:(v,w,n)}
- @r{ v1 v2@: V I @:mop aop @: 22 @:inner@:(mop,aop,v1,v2)}
- @r{ m@: V J @: @: 1 @:ctrn@:(m)}
- @r{ m@: V L @: @: 1 @:lud@:(m)}
- @r{ v@: V M @:op @: 22,23 @:map@:(op,v)}
- @r{ v@: V N @: @: 1 @:cnorm@:(v)}
- @r{ v1 v2@: V O @:op @: 22 @:outer@:(op,v1,v2)}
- @r{ v@: V R @:op @: 22,23 @:reduce@:(op,v)}
- @r{ v@: I V R @:op @: 22,23 @:rreduce@:(op,v)}
- @r{ a n@: H V R @:op @: 22 @:nest@:(op,a,n)}
- @r{ a@: I H V R @:op @: 22 @:fixp@:(op,a)}
- @r{ v@: V S @: @: @:sort@:(v)}
- @r{ v@: I V S @: @: @:rsort@:(v)}
- @r{ m@: V T @: @: 1 @:tr@:(m)}
- @r{ v@: V U @:op @: 22 @:accum@:(op,v)}
- @r{ v@: I V U @:op @: 22 @:raccum@:(op,v)}
- @r{ a n@: H V U @:op @: 22 @:anest@:(op,a,n)}
- @r{ a@: I H V U @:op @: 22 @:afixp@:(op,a)}
- @r{ s t@: V V @: @: 2 @:vunion@:(s,t)}
- @r{ s t@: V X @: @: 2 @:vxor@:(s,t)}
- X
- @c
- @r{ @: Y @: @: @:@:user commands}
- X
- @c
- @r{ @: z @: @: @:@:user commands}
- X
- @c
- @r{ c@: Z [ @: @: 45 @:calc-kbd-if@:}
- @r{ c@: Z | @: @: 45 @:calc-kbd-else-if@:}
- @r{ @: Z : @: @: @:calc-kbd-else@:}
- @r{ @: Z ] @: @: @:calc-kbd-end-if@:}
- X
- @c
- @r{ @: Z @{ @: @: 4 @:calc-kbd-loop@:}
- @r{ c@: Z / @: @: 45 @:calc-kbd-break@:}
- @r{ @: Z @} @: @: @:calc-kbd-end-loop@:}
- @r{ n@: Z < @: @: @:calc-kbd-repeat@:}
- @r{ @: Z > @: @: @:calc-kbd-end-repeat@:}
- @r{ n m@: Z ( @: @: @:calc-kbd-for@:}
- @r{ s@: Z ) @: @: @:calc-kbd-end-for@:}
- X
- @c
- @r{ @: Z C-g @: @: @:@:cancel if/loop command}
- X
- @c
- @r{ @: Z ` @: @: @:calc-kbd-push@:}
- @r{ @: Z ' @: @: @:calc-kbd-pop@:}
- @r{ a@: Z = @:message @: 28 @:calc-kbd-report@:}
- @r{ @: Z # @:prompt @: @:calc-kbd-query@:}
- X
- @c
- @r{ comp@: Z C @:func, args @: 50 @:calc-user-define-composition@:}
- @r{ @: Z D @:key, command @: @:calc-user-define@:}
- @r{ @: Z E @:key, editing @: 30 @:calc-user-define-edit@:}
- @r{ defn@: Z F @:k, c, f, a, n@: 28 @:calc-user-define-formula@:}
- @r{ @: Z G @:key @: @:calc-get-user-defn@:}
- @r{ @: Z I @: @: @:calc-user-define-invocation@:}
- @r{ @: Z K @:key, command @: @:calc-user-define-kbd-macro@:}
- @r{ @: Z P @:key @: @:calc-user-define-permanent@:}
- @r{ @: Z T @: @: 12 @:calc-timing@:}
- @r{ @: Z U @:key @: @:calc-user-undefine@:}
- X
- @end format
- X
- @noindent
- NOTES
- X
- @enumerate
- @c 1
- @item
- Positive prefix arguments apply to @cite{n} stack entries.
- Negative prefix arguments apply to the @cite{-n}th stack entry.
- A prefix of zero applies to the entire stack. (For @key{LFD} and
- @kbd{M-DEL}, the meaning of the sign is reversed.)
- X
- @c 2
- @item
- Positive prefix arguments apply to @cite{n} stack entries.
- Negative prefix arguments apply to the top stack entry
- and the next @cite{-n} stack entries.
- X
- @c 3
- @item
- Positive prefix arguments rotate top @cite{n} stack entries by one.
- Negative prefix arguments rotate the entire stack by @cite{-n}.
- A prefix of zero reverses the entire stack.
- X
- @c 4
- @item
- Prefix argument specifies a repeat count or distance.
- X
- @c 5
- @item
- Positive prefix arguments specify a precision @cite{p}.
- Negative prefix arguments reduce the current precision by @cite{-p}.
- X
- @c 6
- @item
- A prefix argument is interpreted as an additional step-size parameter.
- A plain @kbd{C-u} prefix means to prompt for the step size.
- X
- @c 7
- @item
- A prefix argument specifies simplification level and depth.
- 1=Default, 2=like @kbd{a s}, 3=like @kbd{a e}.
- X
- @c 8
- @item
- A negative prefix operates only on the top level of the input formula.
- X
- @c 9
- @item
- Positive prefix arguments specify a word size of @cite{w} bits, unsigned.
- Negative prefix arguments specify a word size of @cite{w} bits, signed.
- X
- @c 10
- @item
- Prefix arguments specify the shift amount @cite{n}. The @cite{w} argument
- cannot be specified in the keyboard version of this command.
- X
- @c 11
- @item
- XFrom the keyboard, @cite{d} is omitted and defaults to zero.
- X
- @c 12
- @item
- Mode is toggled; a positive prefix always sets the mode, and a negative
- prefix always clears the mode.
- X
- @c 13
- @item
- Some prefix argument values provide special variations of the mode.
- X
- @c 14
- @item
- A prefix argument, if any, is used for @cite{m} instead of taking
- @cite{m} from the stack. @cite{M} may take any of these values:
- @iftex
- {@advance@tableindent10pt
- @end iftex
- @table @asis
- @item Integer
- Random integer in the interval @cite{[0 .. m)}.
- @item Float
- Random floating-point number in the interval @cite{[0 .. m)}.
- @item 0.0
- Gaussian with mean 1 and standard deviation 0.
- @item Error form
- Gaussian with specified mean and standard deviation.
- @item Interval
- Random integer or floating-point number in that interval.
- @item Vector
- Random element from the vector.
- @end table
- @iftex
- }
- @end iftex
- X
- @c 15
- @item
- A prefix argument from 1 to 6 specifies number of date components
- to remove from the stack. @xref{Date Conversions}.
- X
- @c 16
- @item
- A prefix argument specifies a time zone; @kbd{C-u} says to take the
- time zone number or name from the top of the stack. @xref{Time Zones}.
- X
- @c 17
- @item
- A prefix argument specifies a day number (0-6, 0-31, or 0-366).
- X
- @c 18
- @item
- If the input has no units, you will be prompted for both the old and
- the new units.
- X
- @c 19
- @item
- With a prefix argument, collect that many stack entries to form the
- input data set. Each entry may be a single value or a vector of values.
- X
- @c 20
- @item
- With a prefix argument of 1, take a single @c{$N\times2$}
- @asis{Nx2} matrix from the
- stack instead of two separate data vectors.
- X
- @c 21
- @item
- The row or column number @cite{n} may be given as a numeric prefix
- argument instead. A plain @kbd{C-u} prefix says to take @cite{n}
- from the top of the stack. If @cite{n} is a vector or interval,
- a subvector/submatrix of the input is created.
- X
- @c 22
- @item
- The @cite{op} prompt can be answered with the key sequence for the
- desired function, or with @kbd{x} or @kbd{z} followed by a function name,
- or with @kbd{$} to take a formula from the top of the stack, or with
- @kbd{'} and a typed formula. In the last two cases, the formula may
- be a nameless function like @samp{<#1+#2>} or @samp{<x, y : x+y>}, or it
- may include @kbd{$}, @kbd{$$}, etc. (where @kbd{$} will correspond to the
- last argument of the created function), or otherwise you will be
- prompted for an argument list. The number of vectors popped from the
- stack by @kbd{V M} depends on the number of arguments of the function.
- X
- @c 23
- @item
- One of the mapping direction sequences @kbd{_} (horizontal, i.e., map
- by rows or reduce across), @kbd{:} (vertical, i.e., map by columns or
- reduce down), or @kbd{=} (map or reduce by rows) may be given before
- entering @cite{op}; these modify the function name by adding the letter
- @code{r} for ``rows,'' @code{c} for ``columns,'' @code{a} for ``across,''
- or @code{d} for ``down.''
- X
- @c 24
- @item
- The prefix argument specifies a packing mode. A nonnegative mode
- is the number of items (for @kbd{v p}) or the number of levels
- (for @kbd{v u}). A negative mode is as described below. With no
- prefix argument, the mode is taken from the top of the stack and
- may be an integer or a vector of integers.
- @iftex
- {@advance@tableindent-20pt
- @end iftex
- @table @cite
- @item -1
- @var{(2)} Rectangular complex number.
- @item -2
- @var{(2)} Polar complex number.
- @item -3
- @var{(3)} HMS form.
- @item -4
- @var{(2)} Error form.
- @item -5
- @var{(2)} Modulo form.
- @item -6
- @var{(2)} Closed interval.
- @item -7
- @var{(2)} Closed .. open interval.
- @item -8
- @var{(2)} Open .. closed interval.
- @item -9
- @var{(2)} Open interval.
- @item -10
- @var{(2)} Fraction.
- @item -11
- @var{(2)} Float with integer mantissa.
- @item -12
- @var{(2)} Float with mantissa in @cite{[1 .. 10)}.
- @item -13
- @var{(1)} Date form (using date numbers).
- @item -14
- @var{(3)} Date form (using year, month, day).
- @item -15
- @var{(6)} Date form (using year, month, day, hour, minute, second).
- @end table
- @iftex
- }
- @end iftex
- X
- @c 25
- @item
- A prefix argument specifies the size @cite{n} of the matrix. With no
- prefix argument, @cite{n} is omitted and the size is inferred from
- the input vector.
- X
- @c 26
- @item
- The prefix argument specifies the starting position @cite{n} (default 1).
- X
- @c 27
- @item
- Cursor position within stack buffer affects this command.
- X
- @c 28
- @item
- Arguments are not actually removed from the stack by this command.
- X
- @c 29
- @item
- Variable name may be a single digit or a full name.
- X
- @c 30
- @item
- Editing occurs in a separate buffer. Press @kbd{M-# M-#} (or @kbd{C-c C-c},
- @key{LFD}, or in some cases @key{RET}) to finish the edit, or press
- @kbd{M-# x} to cancel the edit.
- X
- @c 31
- @item
- The number prompted for can also be provided as a prefix argument.
- X
- @c 32
- @item
- Press this key a second time to cancel the prefix.
- X
- @c 33
- @item
- With a negative prefix, deactivate all formulas. With a positive
- prefix, deactivate and then reactivate from scratch.
- X
- @c 34
- @item
- Default is to scan for nearest formula delimiter symbols. With a
- prefix of zero, formula is delimited by mark and point. With a
- non-zero prefix, formula is delimited by scanning forward or
- backward by that many lines.
- X
- @c 35
- @item
- Parse the region between point and mark as a vector. A positive or
- negative prefix parses @var{n} lines before or after point as a vector.
- A zero prefix parses the current line as a vector. A @kbd{C-u} prefix
- parses the region between point and mark as a single formula.
- X
- @c 36
- @item
- Parse the rectangle defined by point and mark as a matrix. A positive
- prefix @var{n} divides the rectangle into columns of width @var{n}.
- A zero or @kbd{C-u} prefix parses each line as one formula. A negative
- prefix suppresses special treatment of bracketed portions of a line.
- X
- @c 37
- @item
- A numeric prefix causes the current language mode to be ignored.
- X
- @c 38
- @item
- Responding to a prompt with a blank line answers that and all
- later prompts by popping additional stack entries.
- X
- @c 39
- @item
- Answer for @cite{v} may also be of the form @cite{v = v_0} or
- @cite{v - v_0}.
- X
- @c 40
- @item
- With a positive prefix argument, stack contains many @cite{y}s and one
- common @cite{x}. With a zero prefix, stack contains a vector of
- @cite{y}s and a common @cite{x}. With a negative prefix, stack
- contains many @cite{[x,y]} vectors. (For 3D plots, substitute
- @cite{z} for @cite{y} and @cite{x,y} for @cite{x}.)
- X
- @c 41
- @item
- With any prefix argument, all curves in the graph are deleted.
- X
- @c 42
- @item
- With a positive prefix, refines an existing plot with more data points.
- With a negative prefix, forces recomputation of the plot data.
- X
- @c 43
- @item
- With any prefix argument, set the default value instead of the
- value for this graph.
- X
- @c 44
- @item
- With a negative prefix argument, set the value for the printer.
- X
- @c 45
- @item
- Condition is considered ``true'' if it is a nonzero real or complex
- number; it is ``false'' if it is zero,
- X
- @c 46
- @item
- Several formulas separated by commas are pushed as multiple stack
- entries. Trailing @kbd{)}, @kbd{]}, @kbd{@}}, @kbd{>}, and @kbd{"}
- delimiters may be omitted. The notation @kbd{$$$} refers to the value
- in stack level three, and causes the formula to replace the top three
- stack levels. The notation @kbd{$3} refers to stack level three without
- causing that value to be removed from the stack. Use @key{LFD} in place
- of @key{RET} to prevent evaluation.@refill
- X
- @c 47
- @item
- The variable is replaced by the formula shown on the right. The
- Inverse flag reverses the order of the operands, e.g., @kbd{I s - x}
- assigns @cite{x := a-x}.
- X
- @c 48
- @item
- Press @kbd{?} repeatedly to see how to choose a model. Answer the
- variables prompt with @cite{iv} or `@i{iv};@i{pv}' to specify
- independent and parameter variables. A positive prefix argument
- takes @i{N+1} vectors from the stack; a zero prefix takes a matrix
- and a vector from the stack.
- X
- @c 49
- @item
- With a plain @kbd{C-u} prefix, replace the current region of the
- destination buffer with the yanked text instead of inserting.
- X
- @c 50
- @item
- All stack entries are reformatted; the @kbd{H} prefix inhibits this.
- The @kbd{I} prefix sets the mode temporarily, redraws the top stack
- entry, then restores the original setting of the mode.
- X
- @c 51
- @item
- A negative prefix sets the default 3D resolution instead of the
- default 2D resolution.
- @end enumerate
- X
- @iftex
- (Space is provided below for you to keep your own written notes.)
- @page
- @end iftex
- X
- X
- @c [end-summary]
- X
- @node Key Index, Command Index, Summary, Top
- @unnumbered Index of Key Sequences
- X
- @printindex ky
- X
- @node Command Index, Function Index, Key Index, Top
- @unnumbered Index of Calculator Commands
- X
- Since all Calculator commands begin with the prefix @samp{calc-}, the
- @kbd{x} key has been provided as a variant of @kbd{M-x} which automatically
- types @samp{calc-} for you. Thus, @kbd{x last-args} is short for
- @kbd{M-x calc-last-args}.
- X
- @printindex pg
- X
- @node Function Index, Concept Index, Command Index, Top
- @unnumbered Index of Algebraic Functions
- X
- This is a list of built-in functions usable in algebraic expressions.
- Their full Lisp names are derived by adding the prefix @samp{calcFunc-},
- as in @code{calcFunc-sqrt}.
- X
- @printindex tp
- X
- @node Concept Index, Variable Index, Function Index, Top
- @unnumbered Concept Index
- X
- @printindex cp
- X
- @node Variable Index, Lisp Function Index, Concept Index, Top
- @unnumbered Index of Variables
- X
- The variables in this list that do not contain dashes are accessible
- as Calc variables. Add a @samp{var-} prefix to get the name of the
- corresponding Lisp variable.
- X
- The remaining variables are Lisp variables suitable for @code{setq}ing
- in your @file{.emacs} file.
- X
- @printindex vr
- X
- @node Lisp Function Index, , Variable Index, Top
- @unnumbered Index of Lisp Math Functions
- X
- The following functions are meant to be used with @code{defmath}, not
- @code{defun} definitions. For names that do not start with @samp{calc-},
- the corresponding full Lisp name is derived by adding a prefix of
- @samp{math-}.
- X
- @printindex fn
- X
- @summarycontents
- X
- @c [end]
- X
- @contents
- @bye
- X
- X
- SHAR_EOF
- echo 'File calc.texinfo is complete' &&
- chmod 0644 calc.texinfo ||
- echo 'restore of calc.texinfo failed'
- Wc_c="`wc -c < 'calc.texinfo'`"
- test 1420611 -eq "$Wc_c" ||
- echo 'calc.texinfo: original size 1420611, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- rm -f _shar_seq_.tmp
- echo You have unpacked the last part
- exit 0
- exit 0 # Just in case...
- --
- Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM
- Sterling Software, IMD UUCP: uunet!sparky!kent
- Phone: (402) 291-8300 FAX: (402) 291-4362
- Please send comp.sources.misc-related mail to kent@uunet.uu.net.
-